/**
 * 
 */
package com.wsmhz.security;

import org.springframework.social.connect.Connection;
import org.springframework.social.connect.ConnectionSignUp;
import org.springframework.stereotype.Component;

/**
 * create by tangbj on 2018/4/5
 * 根据社交用户信息默认创建用户并返回用户唯一标识(不需要手动绑定)
 */
//@Component
public class DemoConnectionSignUp implements ConnectionSignUp {

	@Override
	public String execute(Connection<?> connection) {
		return connection.getDisplayName();//根据需求，拿某些字段来当作第三方的userId（如：昵称）
	}

}
